//
//  ToolUtil.h
//  River
//
//  Created by iMacOne on 15/11/27.
//  Copyright © 2015年 iMacOne. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

@interface ToolUtil : NSObject

+ (void)creatAlertControl:(id)viewControl alertString:(NSString *)str;

//判断手机号码
//+ (BOOL)JudgeHandset:(NSString *)Str;
+ (BOOL)isPhoneNumber:(NSString *)phoneString;
//判断邮箱号
+ (BOOL)isValidateEmail:(NSString *)email;
//#pragma mark 在底部弹出一个黑色的提示条
//- (void)prompt:(NSString*)msg;

//字典转data
+(NSData*)returnDataWithDictionary:(NSDictionary*)dict;
//修改某一段字体颜色
+ (NSMutableAttributedString *)labelAttributeDict:(NSDictionary *)dic;
//给某一段文字添加下划线
+ (NSMutableAttributedString *)addHyperLine:(NSString *)content;

#pragma mark 判断字符串是否为空
+ (BOOL) isBlank:(NSString *)string;

#pragma mark 获得字符串的字节长度(一个中文两个字节)
+ (int)getStrLen:(NSString*)text;

+ (void)callPhone:(UIViewController *)control phone:(NSString*)phone;
//判断手机号码
//+ (BOOL)isPhoneNumber:(NSString *)phoneString;

//表单中的横线
+ (float)createLine:(float)y superView:(UIView*)view lift:(float)lift width:(float)width hight:(float)hight color:(UIColor *)color;
//表单中的竖线
+ (float)createVerticalLine:(float)y superView:(UIView*)view lift:(float)lift height:(float)height;

//自适应高度
+ (CGFloat)customAutoHeigh:(NSString *)contentString width:(CGFloat)width num:(CGFloat)num;

//自适应宽度
+ (CGFloat)autoWidth:(NSString *)nameString width:(CGFloat)width height:(CGFloat)height num:(CGFloat)num;
+ (CGSize)autoWidth1:(NSString *)nameString width:(CGFloat)width height:(CGFloat)height num:(CGFloat)num;
#pragma mark Label设置行高
+ (NSMutableAttributedString *)labelHeight:(CGFloat)height string:(NSString *)str;

#pragma mark 黑色View提示框
+ (void)blackColorLabel:(NSString *)str;


//画虚线
+ (void)drawingLineFrameLayer:(UIView *)view withFarmeStare:(CGRect)rect;


#pragma mark -- 改变获取验证码的颜色
+(void)changeButState:(UIButton *)get withNormTCo:(UIColor*)Nco andSeleCo:(UIColor*)selCo withNoBaGCol:(UIColor*)NorBGCo andSele:(UIColor*)selBgC and:(void (^)(void))timeEnd;

#pragma mark -- 得到转换之后的签名
//+(NSString * )getOrderString:(NSDictionary *)parDiect;

#pragma mark -- 判断身份证是否合法
+ (BOOL)isCorrect:(NSString *)IDNumber;

#pragma mark 分享

+(NSString *)getCurrentTiem;

//#pragma mark -- 余额支付密码View
//+(void)PayQRViewShow:(void (^)(NSString *))payPass;




/*
 *  是否应该显示版本新特性页面
 */
+(BOOL)canShowNewFeature;


//GCS倒计时封装
+ (void)countDownWithTime:(int)time
           countDownBlock:(void (^)(int timeLeft))countDownBlock
                 endBlock:(void (^)())endBlock;













//NSString* identifierNumber = [[UIDevice currentDevice].identifierForVendor UUIDString] ;
//NSLog(@"手机序列号: %@",identifierNumber);
////手机别名： 用户定义的名称
//NSString* userPhoneName = [[UIDevice currentDevice] name];
//NSLog(@"手机别名: %@", userPhoneName);
////设备名称
//NSString* deviceName = [[UIDevice currentDevice] systemName];
//NSLog(@"设备名称: %@",deviceName );
////手机系统版本
//NSString* phoneVersion = [[UIDevice currentDevice] systemVersion];
//NSLog(@"手机系统版本: %@", phoneVersion);
////手机型号
//NSString* phoneModel = [[UIDevice currentDevice] model];
//NSLog(@"手机型号: %@",phoneModel );
////地方型号 （国际化区域名称）
//NSString* localPhoneModel = [[UIDevice currentDevice] localizedModel];
//NSLog(@"国际化区域名称: %@",localPhoneModel );
//
//NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
//// 当前应用名称
//NSString *appCurName = [infoDictionary objectForKey:@"CFBundleDisplayName"];
//NSLog(@"当前应用名称：%@",appCurName);
//// 当前应用软件版本 比如：1.0.1
//NSString *appCurVersion = [infoDictionary objectForKey:@"CFBundleShortVersionString"];
//NSLog(@"当前应用软件版本:%@",appCurVersion);
//// 当前应用版本号码 int类型
//NSString *appCurVersionNum = [infoDictionary objectForKey:@"CFBundleVersion"];
//NSLog(@"当前应用版本号码：%@",appCurVersionNum);

@end
